import { Body, Controller, Post, Inject } from '@midwayjs/core';
import { AccessLogService } from '../../service/accesslog.service';
import { RespInfo } from '../../types/common.type';



@Controller('/admin/accesslog')
export class AccessLogController {

  @Inject()
  accessLogService: AccessLogService;

  /** 获取访问日志列表 */
  @Post('/list')
  async list(@Body() info: { page: number, number: number }): Promise<RespInfo> {
    const { page, number } = info;
    return this.accessLogService.list(page, number);
  }

}